package movieGandalf.search;

public class DirectorNameParam implements SearchParam{
	
	private String directorName;
	
	public DirectorNameParam(String directorName){
		this.directorName = directorName;
	}
	
	public String getParam() {
		return "";
	}
	
	public Object getValue(){
		return "" + directorName + "";
	}
	
	public String getJoin(){
		return "INNER JOIN (SELECT directorID FROM Directors WHERE directorName LIKE CONCAT('%',?,'%')) AS DirectorHelp ON MoviesWithData.directorID=DirectorHelp.directorID";
	}
	
	public boolean isParamOnJoin(){
		return true;
	}
	
}
